package com.ruoyi.coupon.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * couponrecord对象 coupon_record
 *
 * @author 林道敬
 * @date 2025-01-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("coupon_record")
public class CouponRecord extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    @TableId
    private String id;

    /** 优惠券id */
    @Excel(name = "优惠券id")
    private Long couponId;

    /** 使用状态  可用 NEW,已使用USED,过期 EXPIRED; */
    @Excel(name = "使用状态  可用 NEW,已使用USED,过期 EXPIRED;")
    private String useState;

    /** 用户id */
    @Excel(name = "用户id")
    private Long userId;

    /** 用户昵称 */
    @Excel(name = "用户昵称")
    private String userName;

    /** 优惠券标题 */
    @Excel(name = "优惠券标题")
    private String couponTitle;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 订单id */
    @Excel(name = "订单id")
    private Long orderId;

    /** 抵扣价格 */
    @Excel(name = "抵扣价格")
    private BigDecimal price;

    /** 满多少才可以使用 */
    @Excel(name = "满多少才可以使用")
    private BigDecimal conditionPrice;

    public void setId(String id)
    {
        this.id = id;
    }

    public String getId()
    {
        return id;
    }
    public void setCouponId(Long couponId)
    {
        this.couponId = couponId;
    }

    public Long getCouponId()
    {
        return couponId;
    }
    public void setUseState(String useState)
    {
        this.useState = useState;
    }

    public String getUseState()
    {
        return useState;
    }
    public void setUserId(Long userId)
    {
        this.userId = userId;
    }

    public Long getUserId()
    {
        return userId;
    }
    public void setUserName(String userName)
    {
        this.userName = userName;
    }

    public String getUserName()
    {
        return userName;
    }
    public void setCouponTitle(String couponTitle)
    {
        this.couponTitle = couponTitle;
    }

    public String getCouponTitle()
    {
        return couponTitle;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId()
    {
        return orderId;
    }
    public void setPrice(BigDecimal price)
    {
        this.price = price;
    }

    public BigDecimal getPrice()
    {
        return price;
    }
    public void setConditionPrice(BigDecimal conditionPrice)
    {
        this.conditionPrice = conditionPrice;
    }

    public BigDecimal getConditionPrice()
    {
        return conditionPrice;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("couponId", getCouponId())
            .append("createTime", getCreateTime())
            .append("useState", getUseState())
            .append("userId", getUserId())
            .append("userName", getUserName())
            .append("couponTitle", getCouponTitle())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("orderId", getOrderId())
            .append("price", getPrice())
            .append("conditionPrice", getConditionPrice())
            .toString();
    }
}
